package coml.jiyun.hp.xaizai.presenter;

import coml.jiyun.hp.xaizai.bean.WanBean;
import coml.jiyun.hp.xaizai.fragment.HomeFragment;
import coml.jiyun.hp.xaizai.model.ImpWanModel;
import coml.jiyun.hp.xaizai.model.WanModel;
import coml.jiyun.hp.xaizai.net.WanCallBack;
import coml.jiyun.hp.xaizai.view.WanView;

public class ImpWanPresenter implements WanPresenter, WanCallBack {

    private WanView wanView;
    private WanModel wanModel;

    public ImpWanPresenter(WanView wanView, WanModel wanModel) {
        this.wanView = wanView;
        this.wanModel = wanModel;
    }

    @Override
    public void getData() {
        wanModel.getData(this);
    }

    @Override
    public void onSuccess(WanBean wanBean) {
        wanView.onSuccess(wanBean);
    }

    @Override
    public void onFail(String str) {
        wanView.onFail(str);
    }
}
